package com.demo.weather.server.tcp;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.demo.weather.server.AbstractServer;
import com.demo.weather.server.WeatherServerProperties;
import com.demo.weather.server.handler.EncodeHandler;
import com.demo.weather.server.handler.PacketDataHandler;

import lombok.extern.slf4j.Slf4j;

/**
 * TCP协议
 * @author tangheng
 */
@Slf4j
@Component
public class TcpServer extends AbstractServer {

	@Autowired
	public TcpServer(EncodeHandler encodeHandler, PacketDataHandler packetHandler,
			WeatherServerProperties serverProperties) {
		super(encodeHandler, packetHandler, serverProperties);
		log.info("TCP Server Started on port {}", serverProperties.getPort());
	}
}